﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using VNet.VisiSuite.VisiAdmin.Models;

namespace VNet.VisiSuite.VisiAdmin.Common.Converters
{
    public class ReasonCodeToTextConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if (value is ReasonCodeModel && value != null)
            {
                return ((ReasonCodeModel)value).Description;
            }
            return string.Empty;
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            return value;
        }
    }
}
